inherit alice

INS_DIR="/opt/cern/alice/geant3/${PV}"

DESCRIPTION="Simulation tool for high energy physics"
SRC_URI=""
ESVN_REPO_URI="http://root.cern.ch/svn/geant3/tags/v${GEANT3_PV}"
ESVN_PROJECT="geant3"
HOMEPAGE="http://root.cern.ch/"

SLOT="${PV}"
LICENSE="LGPL-2.1"
KEYWORDS="amd64 x86"

IUSE=""
CDEPEND="$ROOT_VERSION_DEP"

DEPEND="${CDEPEND}
  >=sci-physics/eselect-geant3-1.1.0"

RDEPEND="${CDEPEND}"

S="${WORKDIR}/${PN}"

src_compile() {
  alice_set_rootsys_env
  emake OPT="${CFLAGS}" F77OPT="${FFLAGS}" || die "emake failed"
}

src_install() {
  G3ARCH=`root-config --arch`
  insinto $INS_DIR/lib/tgt_$G3ARCH/
  doins lib/tgt_$G3ARCH/libgeant321.so 
  insinto $INS_DIR/geant321/
  doins geant321/*
  insinto $INS_DIR/TGeant3/
  doins TGeant3/*.h
}
